﻿#include "DSPChain.h"

#ifdef USEJNI
#include "DSPChain_JNI.h"
#include "util/JNIUtil.h"
#include "util/JNIUtil.hpp"
using namespace yzrilyzr_dsp;
using namespace yzrilyzr_util;
JNIEXPORT jlong JNICALL Java_yzrilyzr_dsp_DSPChain_constructor(JNIEnv* env, jobject, jlongArray toAdd) {
	Array<DSP>* dsps = jArray2WithLength<DSP>(env, toAdd);
	DSPChain* ptr = new DSPChain(dsps);
	return reinterpret_cast<jlong>(ptr);
}
JNIEXPORT void JNICALL Java_yzrilyzr_dsp_DSPChain_add(JNIEnv*, jobject, jlong ptr1, jlong dspToAdd) {
	DSPChain* ptr = reinterpret_cast<DSPChain*>(ptr1);
	ptr->add(reinterpret_cast<DSP*>(dspToAdd));
}
#endif